<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>绝对定位示例 1</title>
    <style>
        html{
            background-color: rgb(11, 15, 15);
        }

        body{
            position: static;
            margin: 50px;
            height: 2000px;
            background-color: rgb(163, 168, 168);
        }

        .parent {
            position: static;
            width: 300px;
            height: 200px;
            background-color: lightblue;
            margin: 0px auto;
        }

        .child {
            position: absolute;
            width: 100px;
            height: 100px;
            background-color: lightcoral;
            bottom: 20px;
            right: 30px;
        }
    </style>
</head>

<body>
    <div class="parent">
        父元素
        <div class="child">子元素</div>
    </div>
</body>

</html>